{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# Custom Models in pycalphad: Viscosity"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "## Viscosity Model Background\n",
    "\n",
    "We are going to take a CALPHAD-based property model from the literature and use it to predict the viscosity of Al-Cu-Zr liquids.\n",
    "\n",
    "For a binary alloy liquid under small undercooling, Gąsior suggested an entropy model of the form\n",
    "$$\\eta = (\\sum_i x_i \\eta_i ) (1 - 2\\frac{S_{ex}}{R})$$\n",
    "\n",
    "where $\\eta_i$ is the viscosity of the element $i$, $x_i$ is the mole fraction, $S_{ex}$ is the excess entropy, and $R$ is the gas constant.\n",
    "\n",
    "For more details on this model, see \n",
    "\n",
    "1. M.E. Trybula, T. Gancarz, W. Gąsior, *Density, surface tension and viscosity of liquid binary Al-Zn and ternary Al-Li-Zn alloys*, Fluid Phase Equilibria 421 (2016) 39-48, [doi:10.1016/j.fluid.2016.03.013](http://dx.doi.org/10.1016/j.fluid.2016.03.013).\n",
    "\n",
    "2. Władysław Gąsior, *Viscosity modeling of binary alloys: Comparative studies*, Calphad 44 (2014) 119-128, [doi:10.1016/j.calphad.2013.10.007](http://dx.doi.org/10.1016/j.calphad.2013.10.007).\n",
    "\n",
    "3. Chenyang Zhou, Cuiping Guo, Changrong Li, Zhenmin Du, *Thermodynamic assessment of the phase equilibria and prediction of glass-forming ability of the Al–Cu–Zr system*, Journal of Non-Crystalline Solids 461 (2017) 47-60, [doi:10.1016/j.jnoncrysol.2016.09.031](https://doi.org/10.1016/j.jnoncrysol.2016.09.031)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true,
    "deletable": true,
    "editable": true
   },
   "outputs": [],
   "source": [
    "from pycalphad import Database"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "## TDB Parameters\n",
    "We can calculate the excess entropy of the liquid using the Al-Cu-Zr thermodynamic database from Zhou et al.\n",
    "\n",
    "We add three new parameters to describe the viscosity (in Pa-s) of the pure elements Al, Cu, and Zr:\n",
    "```\n",
    "   $ Viscosity test parameters\n",
    "   PARAMETER ETA(LIQUID,AL;0) 2.98150E+02  +0.000281*EXP(12300/(8.3145*T));   6.00000E+03   \n",
    "  N REF:0 !\n",
    "   PARAMETER ETA(LIQUID,CU;0) 2.98150E+02  +0.000657*EXP(21500/(8.3145*T));   6.00000E+03   \n",
    "  N REF:0 !\n",
    "  PARAMETER ETA(LIQUID,ZR;0) 2.98150E+02  +4.74E-3 - 4.97E-6*(T-2128) ;   6.00000E+03   \n",
    "    N REF:0 !\n",
    "```\n",
    "\n",
    "Great! However, if we try to load the database now, we will get an error. This is because `ETA` parameters are not supported by default in pycalphad, so we need to tell pycalphad's TDB parser that \"ETA\" should be on the list of supported parameter types."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Failed while parsing:     PARAMETER ETA(LIQUID,AL;0) 2.98150E+02 +0.000281*EXP(12300/(8.3145*T)); 6.00000E+03 N REF:0 \n",
      "Tokens: None\n"
     ]
    },
    {
     "ename": "ParseException",
     "evalue": "Expected {{\"ELEMENT\" W:(ABCD...) [Suppress:(W:(ABCD...))] [Suppress:({Re:('[-+]?([0-9]+\\\\.(?!([0-9]|[eE])))|([0-9]*\\\\.?[0-9]+([eE][-+]?[0-9]+)?)')}...)] LineEnd} | {\"SPECIES\" W:(ABCD...) [Suppress:(\"%\")] Group:({{W:(ABCD...) [Re:('[-+]?([0-9]+\\\\.(?!([0-9]|[eE])))|([0-9]*\\\\.?[0-9]+([eE][-+]?[0-9]+)?)')]}}...) [{Suppress:(\"/\") W:(+-01...)}] LineEnd} | {\"TYPE_DEFINITION\" Suppress:(<SP><TAB><CR><LF>) !W:( !) SkipTo:(LineEnd)} | {\"FUNCTION\" W:(ABCD...) {{Re:('[-+]?([0-9]+\\\\.(?!([0-9]|[eE])))|([0-9]*\\\\.?[0-9]+([eE][-+]?[0-9]+)?)') | [\",\"]...} {{SkipTo:(\";\") Suppress:(\";\") [Suppress:(\",\")]... [Re:('[-+]?([0-9]+\\\\.(?!([0-9]|[eE])))|([0-9]*\\\\.?[0-9]+([eE][-+]?[0-9]+)?)')] Suppress:({W:(YNyn) | <SP><TAB><CR><LF>})}}...}} | {\"ASSESSED_SYSTEMS\" SkipTo:(LineEnd)} | {\"DEFINE_SYSTEM_DEFAULT\" SkipTo:(LineEnd)} | {\"DEFAULT_COMMAND\" SkipTo:(LineEnd)} | {\"DATABASE_INFO\" SkipTo:(LineEnd)} | {\"VERSION_DATE\" SkipTo:(LineEnd)} | {\"REFERENCE_FILE\" SkipTo:(LineEnd)} | {\"ADD_REFERENCES\" SkipTo:(LineEnd)} | {\"LIST_OF_REFERENCES\" SkipTo:(LineEnd)} | {\"TEMPERATURE_LIMITS\" SkipTo:(LineEnd)} | {\"PHASE\" W:(ABCD...) Suppress:(<SP><TAB><CR><LF>) !W:( !) Suppress:(<SP><TAB><CR><LF>) Suppress:(W:(0123...)) Group:({Re:('[-+]?([0-9]+\\\\.(?!([0-9]|[eE])))|([0-9]*\\\\.?[0-9]+([eE][-+]?[0-9]+)?)')}...) LineEnd} | {\"CONSTITUENT\" W:(ABCD...) Suppress:(<SP><TAB><CR><LF>) Suppress:(\":\") Group:(Group:({{[Suppress:(\",\")] {W:(ABCD...) [Suppress:(\"%\")]}}}...) [: Group:({{[Suppress:(\",\")] {W:(ABCD...) [Suppress:(\"%\")]}}}...)]...) Suppress:(\":\") LineEnd} | {\"PARAMETER\" {\"BMAGN\" | \"DF\" | \"DQ\" | \"G\" | \"GD\" | \"L\" | \"MF\" | \"MQ\" | \"NT\" | \"TC\" | \"THETA\" | \"V0\" | \"VS\"} Suppress:(\"(\") W:(ABCD...) [{Suppress:(\"&\") W:(ABCD...)}] Suppress:(\",\") Group:(Group:({{[Suppress:(\",\")] {W:(ABCD...) [Suppress:(\"%\")]}}}...) [: Group:({{[Suppress:(\",\")] {W:(ABCD...) [Suppress:(\"%\")]}}}...)]...) [{Suppress:(\";\") W:(0123...)}] Suppress:(\")\") {{Re:('[-+]?([0-9]+\\\\.(?!([0-9]|[eE])))|([0-9]*\\\\.?[0-9]+([eE][-+]?[0-9]+)?)') | [\",\"]...} {{SkipTo:(\";\") Suppress:(\";\") [Suppress:(\",\")]... [Re:('[-+]?([0-9]+\\\\.(?!([0-9]|[eE])))|([0-9]*\\\\.?[0-9]+([eE][-+]?[0-9]+)?)')] Suppress:({W:(YNyn) | <SP><TAB><CR><LF>})}}...}}} (at char 17), (line:1, col:18)",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mParseException\u001b[0m                            Traceback (most recent call last)",
      "\u001b[0;32m<ipython-input-2-d711f4128286>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[0;32m----> 1\u001b[0;31m \u001b[0mdbf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mDatabase\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'alcuzr-viscosity.tdb'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[0;32m~/Projects/pycalphad/pycalphad/io/database.py\u001b[0m in \u001b[0;36m__new__\u001b[0;34m(cls, *args)\u001b[0m\n\u001b[1;32m    127\u001b[0m             \u001b[0;32melif\u001b[0m \u001b[0mfname\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfind\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'\\n'\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0;34m-\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    128\u001b[0m                 \u001b[0;31m# Single-line string; it's probably a filename\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 129\u001b[0;31m                 \u001b[0;32mreturn\u001b[0m \u001b[0mcls\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfrom_file\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfname\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfmt\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mfmt\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    130\u001b[0m             \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    131\u001b[0m                 \u001b[0;31m# Newlines found: probably a full database string\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/Projects/pycalphad/pycalphad/io/database.py\u001b[0m in \u001b[0;36mfrom_file\u001b[0;34m(fname, fmt)\u001b[0m\n\u001b[1;32m    221\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    222\u001b[0m             \u001b[0mdbf\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mDatabase\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 223\u001b[0;31m             \u001b[0mformat_registry\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mfmt\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlower\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdbf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mfd\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    224\u001b[0m         \u001b[0;32mfinally\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    225\u001b[0m             \u001b[0;31m# Close file descriptors created in this routine\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/Projects/pycalphad/pycalphad/io/tdb.py\u001b[0m in \u001b[0;36mread_tdb\u001b[0;34m(dbf, fd)\u001b[0m\n\u001b[1;32m    913\u001b[0m         \u001b[0mtokens\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    914\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 915\u001b[0;31m             \u001b[0mtokens\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mgrammar\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mparseString\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcommand\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    916\u001b[0m             \u001b[0m_TDB_PROCESSOR\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mtokens\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdbf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0mtokens\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    917\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mParseException\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/envs/calphad-dev/lib/python3.6/site-packages/pyparsing.py\u001b[0m in \u001b[0;36mparseString\u001b[0;34m(self, instring, parseAll)\u001b[0m\n\u001b[1;32m   1826\u001b[0m             \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1827\u001b[0m                 \u001b[0;31m# catch and re-raise exception from here, clears out pyparsing internal stack trace\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1828\u001b[0;31m                 \u001b[0;32mraise\u001b[0m \u001b[0mexc\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1829\u001b[0m         \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1830\u001b[0m             \u001b[0;32mreturn\u001b[0m \u001b[0mtokens\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/envs/calphad-dev/lib/python3.6/site-packages/pyparsing.py\u001b[0m in \u001b[0;36mparseString\u001b[0;34m(self, instring, parseAll)\u001b[0m\n\u001b[1;32m   1816\u001b[0m             \u001b[0minstring\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0minstring\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexpandtabs\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1817\u001b[0m         \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1818\u001b[0;31m             \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtokens\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_parse\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;36m0\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1819\u001b[0m             \u001b[0;32mif\u001b[0m \u001b[0mparseAll\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1820\u001b[0m                 \u001b[0mloc\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpreParse\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mloc\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/envs/calphad-dev/lib/python3.6/site-packages/pyparsing.py\u001b[0m in \u001b[0;36m_parseCache\u001b[0;34m(self, instring, loc, doActions, callPreParse)\u001b[0m\n\u001b[1;32m   1721\u001b[0m                 \u001b[0mParserElement\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpackrat_cache_stats\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mMISS\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1722\u001b[0m                 \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1723\u001b[0;31m                     \u001b[0mvalue\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_parseNoCache\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdoActions\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcallPreParse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1724\u001b[0m                 \u001b[0;32mexcept\u001b[0m \u001b[0mParseBaseException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mpe\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1725\u001b[0m                     \u001b[0;31m# cache a copy of the exception, without the traceback\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/envs/calphad-dev/lib/python3.6/site-packages/pyparsing.py\u001b[0m in \u001b[0;36m_parseNoCache\u001b[0;34m(self, instring, loc, doActions, callPreParse)\u001b[0m\n\u001b[1;32m   1560\u001b[0m             \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmayIndexError\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mpreloc\u001b[0m \u001b[0;34m>=\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minstring\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1561\u001b[0m                 \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1562\u001b[0;31m                     \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mtokens\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mparseImpl\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpreloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdoActions\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1563\u001b[0m                 \u001b[0;32mexcept\u001b[0m \u001b[0mIndexError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1564\u001b[0m                     \u001b[0;32mraise\u001b[0m \u001b[0mParseException\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minstring\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0merrmsg\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/envs/calphad-dev/lib/python3.6/site-packages/pyparsing.py\u001b[0m in \u001b[0;36mparseImpl\u001b[0;34m(self, instring, loc, doActions)\u001b[0m\n\u001b[1;32m   3915\u001b[0m             \u001b[0;32mif\u001b[0m \u001b[0mmaxException\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   3916\u001b[0m                 \u001b[0mmaxException\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmsg\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0merrmsg\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3917\u001b[0;31m                 \u001b[0;32mraise\u001b[0m \u001b[0mmaxException\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   3918\u001b[0m             \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   3919\u001b[0m                 \u001b[0;32mraise\u001b[0m \u001b[0mParseException\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"no defined alternatives to match\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/envs/calphad-dev/lib/python3.6/site-packages/pyparsing.py\u001b[0m in \u001b[0;36mparseImpl\u001b[0;34m(self, instring, loc, doActions)\u001b[0m\n\u001b[1;32m   3900\u001b[0m         \u001b[0;32mfor\u001b[0m \u001b[0me\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexprs\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   3901\u001b[0m             \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3902\u001b[0;31m                 \u001b[0mret\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_parse\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdoActions\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   3903\u001b[0m                 \u001b[0;32mreturn\u001b[0m \u001b[0mret\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   3904\u001b[0m             \u001b[0;32mexcept\u001b[0m \u001b[0mParseException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0merr\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/envs/calphad-dev/lib/python3.6/site-packages/pyparsing.py\u001b[0m in \u001b[0;36m_parseCache\u001b[0;34m(self, instring, loc, doActions, callPreParse)\u001b[0m\n\u001b[1;32m   1721\u001b[0m                 \u001b[0mParserElement\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpackrat_cache_stats\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mMISS\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1722\u001b[0m                 \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1723\u001b[0;31m                     \u001b[0mvalue\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_parseNoCache\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdoActions\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcallPreParse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1724\u001b[0m                 \u001b[0;32mexcept\u001b[0m \u001b[0mParseBaseException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mpe\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1725\u001b[0m                     \u001b[0;31m# cache a copy of the exception, without the traceback\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/envs/calphad-dev/lib/python3.6/site-packages/pyparsing.py\u001b[0m in \u001b[0;36m_parseNoCache\u001b[0;34m(self, instring, loc, doActions, callPreParse)\u001b[0m\n\u001b[1;32m   1560\u001b[0m             \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmayIndexError\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mpreloc\u001b[0m \u001b[0;34m>=\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minstring\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1561\u001b[0m                 \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1562\u001b[0;31m                     \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mtokens\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mparseImpl\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpreloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdoActions\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1563\u001b[0m                 \u001b[0;32mexcept\u001b[0m \u001b[0mIndexError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1564\u001b[0m                     \u001b[0;32mraise\u001b[0m \u001b[0mParseException\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minstring\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0merrmsg\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/envs/calphad-dev/lib/python3.6/site-packages/pyparsing.py\u001b[0m in \u001b[0;36mparseImpl\u001b[0;34m(self, instring, loc, doActions)\u001b[0m\n\u001b[1;32m   3750\u001b[0m                     \u001b[0;32mraise\u001b[0m \u001b[0mParseSyntaxException\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minstring\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0merrmsg\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   3751\u001b[0m             \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3752\u001b[0;31m                 \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mexprtokens\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_parse\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdoActions\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   3753\u001b[0m             \u001b[0;32mif\u001b[0m \u001b[0mexprtokens\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mexprtokens\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mhaskeys\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   3754\u001b[0m                 \u001b[0mresultlist\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0mexprtokens\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/envs/calphad-dev/lib/python3.6/site-packages/pyparsing.py\u001b[0m in \u001b[0;36m_parseCache\u001b[0;34m(self, instring, loc, doActions, callPreParse)\u001b[0m\n\u001b[1;32m   1721\u001b[0m                 \u001b[0mParserElement\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpackrat_cache_stats\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mMISS\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1722\u001b[0m                 \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1723\u001b[0;31m                     \u001b[0mvalue\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_parseNoCache\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdoActions\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcallPreParse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1724\u001b[0m                 \u001b[0;32mexcept\u001b[0m \u001b[0mParseBaseException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mpe\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1725\u001b[0m                     \u001b[0;31m# cache a copy of the exception, without the traceback\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/envs/calphad-dev/lib/python3.6/site-packages/pyparsing.py\u001b[0m in \u001b[0;36m_parseNoCache\u001b[0;34m(self, instring, loc, doActions, callPreParse)\u001b[0m\n\u001b[1;32m   1560\u001b[0m             \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmayIndexError\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0mpreloc\u001b[0m \u001b[0;34m>=\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minstring\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1561\u001b[0m                 \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1562\u001b[0;31m                     \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mtokens\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mparseImpl\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpreloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdoActions\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1563\u001b[0m                 \u001b[0;32mexcept\u001b[0m \u001b[0mIndexError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1564\u001b[0m                     \u001b[0;32mraise\u001b[0m \u001b[0mParseException\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minstring\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0merrmsg\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/envs/calphad-dev/lib/python3.6/site-packages/pyparsing.py\u001b[0m in \u001b[0;36mparseImpl\u001b[0;34m(self, instring, loc, doActions)\u001b[0m\n\u001b[1;32m   3915\u001b[0m             \u001b[0;32mif\u001b[0m \u001b[0mmaxException\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   3916\u001b[0m                 \u001b[0mmaxException\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mmsg\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0merrmsg\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3917\u001b[0;31m                 \u001b[0;32mraise\u001b[0m \u001b[0mmaxException\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   3918\u001b[0m             \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   3919\u001b[0m                 \u001b[0;32mraise\u001b[0m \u001b[0mParseException\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"no defined alternatives to match\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/envs/calphad-dev/lib/python3.6/site-packages/pyparsing.py\u001b[0m in \u001b[0;36mparseImpl\u001b[0;34m(self, instring, loc, doActions)\u001b[0m\n\u001b[1;32m   3900\u001b[0m         \u001b[0;32mfor\u001b[0m \u001b[0me\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mexprs\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   3901\u001b[0m             \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 3902\u001b[0;31m                 \u001b[0mret\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_parse\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdoActions\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   3903\u001b[0m                 \u001b[0;32mreturn\u001b[0m \u001b[0mret\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   3904\u001b[0m             \u001b[0;32mexcept\u001b[0m \u001b[0mParseException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0merr\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/envs/calphad-dev/lib/python3.6/site-packages/pyparsing.py\u001b[0m in \u001b[0;36m_parseCache\u001b[0;34m(self, instring, loc, doActions, callPreParse)\u001b[0m\n\u001b[1;32m   1721\u001b[0m                 \u001b[0mParserElement\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpackrat_cache_stats\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mMISS\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1722\u001b[0m                 \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1723\u001b[0;31m                     \u001b[0mvalue\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_parseNoCache\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdoActions\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mcallPreParse\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1724\u001b[0m                 \u001b[0;32mexcept\u001b[0m \u001b[0mParseBaseException\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mpe\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1725\u001b[0m                     \u001b[0;31m# cache a copy of the exception, without the traceback\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/anaconda3/envs/calphad-dev/lib/python3.6/site-packages/pyparsing.py\u001b[0m in \u001b[0;36m_parseNoCache\u001b[0;34m(self, instring, loc, doActions, callPreParse)\u001b[0m\n\u001b[1;32m   1564\u001b[0m                     \u001b[0;32mraise\u001b[0m \u001b[0mParseException\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minstring\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0merrmsg\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1565\u001b[0m             \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1566\u001b[0;31m                 \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0mtokens\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mparseImpl\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mpreloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdoActions\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m   1567\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m   1568\u001b[0m         \u001b[0mtokens\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpostParse\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtokens\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;32m~/Projects/pycalphad/pycalphad/io/tdb.py\u001b[0m in \u001b[0;36mparseImpl\u001b[0;34m(self, instring, loc, doActions)\u001b[0m\n\u001b[1;32m    174\u001b[0m         \u001b[0;32mexcept\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    175\u001b[0m             \u001b[0;32mpass\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 176\u001b[0;31m         \u001b[0;32mraise\u001b[0m \u001b[0mParseException\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0minstring\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mloc\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0merrmsg\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m    177\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m    178\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_tdb_grammar\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;31m#pylint: disable=R0914\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
      "\u001b[0;31mParseException\u001b[0m: Expected {{\"ELEMENT\" W:(ABCD...) [Suppress:(W:(ABCD...))] [Suppress:({Re:('[-+]?([0-9]+\\\\.(?!([0-9]|[eE])))|([0-9]*\\\\.?[0-9]+([eE][-+]?[0-9]+)?)')}...)] LineEnd} | {\"SPECIES\" W:(ABCD...) [Suppress:(\"%\")] Group:({{W:(ABCD...) [Re:('[-+]?([0-9]+\\\\.(?!([0-9]|[eE])))|([0-9]*\\\\.?[0-9]+([eE][-+]?[0-9]+)?)')]}}...) [{Suppress:(\"/\") W:(+-01...)}] LineEnd} | {\"TYPE_DEFINITION\" Suppress:(<SP><TAB><CR><LF>) !W:( !) SkipTo:(LineEnd)} | {\"FUNCTION\" W:(ABCD...) {{Re:('[-+]?([0-9]+\\\\.(?!([0-9]|[eE])))|([0-9]*\\\\.?[0-9]+([eE][-+]?[0-9]+)?)') | [\",\"]...} {{SkipTo:(\";\") Suppress:(\";\") [Suppress:(\",\")]... [Re:('[-+]?([0-9]+\\\\.(?!([0-9]|[eE])))|([0-9]*\\\\.?[0-9]+([eE][-+]?[0-9]+)?)')] Suppress:({W:(YNyn) | <SP><TAB><CR><LF>})}}...}} | {\"ASSESSED_SYSTEMS\" SkipTo:(LineEnd)} | {\"DEFINE_SYSTEM_DEFAULT\" SkipTo:(LineEnd)} | {\"DEFAULT_COMMAND\" SkipTo:(LineEnd)} | {\"DATABASE_INFO\" SkipTo:(LineEnd)} | {\"VERSION_DATE\" SkipTo:(LineEnd)} | {\"REFERENCE_FILE\" SkipTo:(LineEnd)} | {\"ADD_REFERENCES\" SkipTo:(LineEnd)} | {\"LIST_OF_REFERENCES\" SkipTo:(LineEnd)} | {\"TEMPERATURE_LIMITS\" SkipTo:(LineEnd)} | {\"PHASE\" W:(ABCD...) Suppress:(<SP><TAB><CR><LF>) !W:( !) Suppress:(<SP><TAB><CR><LF>) Suppress:(W:(0123...)) Group:({Re:('[-+]?([0-9]+\\\\.(?!([0-9]|[eE])))|([0-9]*\\\\.?[0-9]+([eE][-+]?[0-9]+)?)')}...) LineEnd} | {\"CONSTITUENT\" W:(ABCD...) Suppress:(<SP><TAB><CR><LF>) Suppress:(\":\") Group:(Group:({{[Suppress:(\",\")] {W:(ABCD...) [Suppress:(\"%\")]}}}...) [: Group:({{[Suppress:(\",\")] {W:(ABCD...) [Suppress:(\"%\")]}}}...)]...) Suppress:(\":\") LineEnd} | {\"PARAMETER\" {\"BMAGN\" | \"DF\" | \"DQ\" | \"G\" | \"GD\" | \"L\" | \"MF\" | \"MQ\" | \"NT\" | \"TC\" | \"THETA\" | \"V0\" | \"VS\"} Suppress:(\"(\") W:(ABCD...) [{Suppress:(\"&\") W:(ABCD...)}] Suppress:(\",\") Group:(Group:({{[Suppress:(\",\")] {W:(ABCD...) [Suppress:(\"%\")]}}}...) [: Group:({{[Suppress:(\",\")] {W:(ABCD...) [Suppress:(\"%\")]}}}...)]...) [{Suppress:(\";\") W:(0123...)}] Suppress:(\")\") {{Re:('[-+]?([0-9]+\\\\.(?!([0-9]|[eE])))|([0-9]*\\\\.?[0-9]+([eE][-+]?[0-9]+)?)') | [\",\"]...} {{SkipTo:(\";\") Suppress:(\";\") [Suppress:(\",\")]... [Re:('[-+]?([0-9]+\\\\.(?!([0-9]|[eE])))|([0-9]*\\\\.?[0-9]+([eE][-+]?[0-9]+)?)')] Suppress:({W:(YNyn) | <SP><TAB><CR><LF>})}}...}}} (at char 17), (line:1, col:18)"
     ]
    }
   ],
   "source": [
    "dbf = Database('alcuzr-viscosity.tdb')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Adding the `ETA` parameter to the TDB parser "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [],
   "source": [
    "import pycalphad.io.tdb_keywords\n",
    "pycalphad.io.tdb_keywords.TDB_PARAM_TYPES.append('ETA')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "Now the database will load:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [],
   "source": [
    "dbf = Database('alcuzr-viscosity.tdb')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "## Writing the Custom Viscosity Model\n",
    "\n",
    "Now that we have our `ETA` parameters in the database, we need to write a `Model` class to tell pycalphad how to compute viscosity. All custom models are subclasses of the pycalphad `Model` class.\n",
    "\n",
    "When the `ViscosityModel` is constructed, the `build_phase` method is run and we need to construct the viscosity model after doing all the other initialization using a new method `build_viscosity`. The implementation of `build_viscosity` needs to do four things:\n",
    "1. Query the Database for all the `ETA` parameters\n",
    "2. Compute their weighted sum\n",
    "3. Compute the excess entropy of the liquid\n",
    "4. Plug all the values into the Gąsior equation and return the result\n",
    "\n",
    "Since the `build_phase` method sets the attribute `viscosity` to the `ViscosityModel`, we can access the property using `viscosity` as the output in pycalphad caluclations."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": true,
    "deletable": true,
    "editable": true
   },
   "outputs": [],
   "source": [
    "from tinydb import where\n",
    "import sympy\n",
    "from pycalphad import Model, variables as v\n",
    "\n",
    "class ViscosityModel(Model):\n",
    "    def build_phase(self, dbe):\n",
    "        super(ViscosityModel, self).build_phase(dbe)\n",
    "        self.viscosity = self.build_viscosity(dbe)\n",
    "\n",
    "    def build_viscosity(self, dbe):\n",
    "        if self.phase_name != 'LIQUID':\n",
    "            raise ValueError('Viscosity is only defined for LIQUID phase')\n",
    "        phase = dbe.phases[self.phase_name]\n",
    "        param_search = dbe.search\n",
    "        # STEP 1\n",
    "        eta_param_query = (\n",
    "            (where('phase_name') == phase.name) & \\\n",
    "            (where('parameter_type') == 'ETA') & \\\n",
    "            (where('constituent_array').test(self._array_validity))\n",
    "        )\n",
    "        # STEP 2\n",
    "        eta = self.redlich_kister_sum(phase, param_search, eta_param_query)\n",
    "        # STEP 3\n",
    "        excess_energy = self.GM - self.models['ref'] - self.models['idmix']\n",
    "        #liquid_mod = Model(dbe, self.components, self.phase_name)\n",
    "        ## we only want the excess contributions to the entropy\n",
    "        #del liquid_mod.models['ref']\n",
    "        #del liquid_mod.models['idmix']\n",
    "        excess_entropy = -excess_energy.diff(v.T)\n",
    "        ks = 2\n",
    "        # STEP 4\n",
    "        result = eta * (1 - ks * excess_entropy / v.R)\n",
    "        self.eta = eta\n",
    "        return result"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "## Performing Calculations\n",
    "\n",
    "Now we can create an instance of `ViscosityModel` for the liquid phase using the `Database` object we created earlier. We can verify this model has a `viscosity` attribute containing a symbolic expression for the viscosity."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1 + 0.240543628600637*(LIQUID0CU*LIQUID0ZR*(LIQUID0CU - LIQUID0ZR)**3*Piecewise((105.895 - 13.6488*log(T), (T >= 298.15) & (T < 6000.0)), (0, True)) + LIQUID0CU*LIQUID0ZR*(LIQUID0CU - LIQUID0ZR)**2*Piecewise((36.8512*log(T) - 270.5305, (T >= 298.15) & (T < 6000.0)), (0, True)) + LIQUID0CU*LIQUID0ZR*(LIQUID0CU - LIQUID0ZR)*Piecewise((75.3798 - 9.6125*log(T), (T >= 298.15) & (T < 6000.0)), (0, True)) + LIQUID0CU*LIQUID0ZR*Piecewise((392.8485 - 51.3121*log(T), (T >= 298.15) & (T < 6000.0)), (0, True)))/(1.0*LIQUID0CU + 1.0*LIQUID0ZR))*(LIQUID0CU*Piecewise((0.000657*exp(2585.84400745685/T), (T >= 298.15) & (T < 6000.0)), (0, True)) + LIQUID0ZR*Piecewise((0.01531616 - 4.97e-6*T, (T >= 298.15) & (T < 6000.0)), (0, True)))\n"
     ]
    }
   ],
   "source": [
    "mod = ViscosityModel(dbf, ['CU', 'ZR'], 'LIQUID')\n",
    "print(mod.viscosity)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "Finally we calculate and plot the viscosity."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAGDCAYAAAA1cVfYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xu8XGV97/HPl52EYAg3ExADITGJpSqX0F0IzREDkpabEgsVbALKqaR4OYLUWjBRRMkBakGknMohXgBBwXrZtRCw6UuiIAmYGEi4KeFO4JAgSgC5JfzOH7M2GXZmzzwze9Zcv+/Xa157Zq1nZn57CPPd63me9SxFBGZmZoPZqtkFmJlZa3NQmJlZWQ4KMzMry0FhZmZlOSjMzKwsB4WZmZXloLCWI+lSSZ9vwvveIOnDjX5fs1bnoLCGkvRTSV8qsf1oSf9P0rCIOCUivtzo2iLi8Ii4IqvnI5JuyeN9JE2QFJKGlWnzYUkrJG2Q9Likfy5uL+mTkpZLelnS5SWe/15J90n6o6SbJO1RtE+Szpf0u+z2z5JUtD8kTS56/BlJT0p6Z10+AGs7DgprtMuBE4q/mDInAFdHxMbGl9SS3gScBowBDgDeC3ymaP8TwDnAtwY+UdIY4EfA54GdgOXAtUVN5gKzgH2AvYGjgL8vVYSk+Vkd74mIu4f0G1n7igjffGvYDdgGeBY4qGjbjsBLwD7Z48uBc7L7Y4DrgD8AzwA3A1tl+3an8IW4HvgdcEm2fStgPvAIsA64Etg+2zcSuCpr/wfgV8Au2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GsPjw91qxKkj4A/FlEzB/Ca0wFTo+IE+pXmVk+POvJrEoR8ePsvIihGAN8vh71mOXNRxRmZlaWxyjMzKwsB4WZmZXloDAzs7IcFGZmVpaDwszMyvr/V/UxKy1soSwAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x432 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "from pycalphad import calculate\n",
    "\n",
    "mod = ViscosityModel(dbf, ['CU', 'ZR'], 'LIQUID')\n",
    "\n",
    "temp = 2100\n",
    "# NOTICE: we need to tell pycalphad about our model for this phase\n",
    "models = {'LIQUID': mod}\n",
    "res = calculate(dbf, ['CU', 'ZR'], 'LIQUID', P=101325, T=temp, model=models, output='viscosity') \n",
    "\n",
    "fig = plt.figure(figsize=(6,6))\n",
    "ax = fig.gca()\n",
    "ax.scatter(res.X.sel(component='ZR'), 1000 * res.viscosity.values)\n",
    "ax.set_xlabel('X(ZR)')\n",
    "ax.set_ylabel('Viscosity (mPa-s)')\n",
    "ax.set_xlim((0,1))\n",
    "ax.set_title('Viscosity at {}K'.format(temp));"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "We repeat the calculation for Al-Cu."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAGDCAYAAAAiU8cRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3X28XFV97/HP1xOS2JDwIElEHkxIUqmV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},
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "from pycalphad import calculate\n",
    "\n",
    "temp = 1300\n",
    "models = {'LIQUID': ViscosityModel}  # we can also use Model class\n",
    "res = calculate(dbf, ['CU', 'AL'], 'LIQUID', P=101325, T=temp, model=models, output='viscosity')\n",
    "\n",
    "fig = plt.figure(figsize=(6,6))\n",
    "ax = fig.gca()\n",
    "ax.scatter(res.X.sel(component='CU'), 1000 * res.viscosity.values)\n",
    "ax.set_xlabel('X(CU)')\n",
    "ax.set_ylabel('Viscosity (mPa-s)')\n",
    "ax.set_xlim((0,1))\n",
    "ax.set_title('Viscosity at {}K'.format(temp));"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python [conda env:calphad-dev]",
   "language": "python",
   "name": "conda-env-calphad-dev-py"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
